	<script type="text/javascript">
		$(document).ready(function(){
			$("#datepicker1").datepicker({
		      dateFormat: "dd/mm/yy",
		      changeMonth: true,
		      changeYear: true
		});
		});
		$(document).ready(function(){
			$("#datepicker2").datepicker({
		      dateFormat: "dd/mm/yy",
		      changeMonth: true,
		      changeYear: true
		});
		});
	</script>
	<script type="text/javascript">
		$(document).ready(function () {
			$("#ppk").select2({
			    placeholder: "Pilih PPK"
			});
		});
		</script>
	<div class="row">
	    <div class="col-xs-12">
	        <div class="box box-primary">
	            <div class="box-header">
                <h3 class="box-title">Klaim</h3>
                <span class="box-title tmb-title">
                	<a href="<?php echo site_url('klaim/add')?>" class="btn btn-xs btn-primary btn-flat"><i class="ion-plus-round"></i>&nbsp;&nbsp;Tambah</button></a>
                </span>
	            </div><!-- /.box-header -->
	            <div class="box-body box-export-tools table-responsive">
	             <?=form_open('klaim/cari')?>
	             <div class="box-body col-xs-12 col-lg-6">
	             		 <!-- text input -->
		                 <div class="form-group">
		                    <label>Nama/Kode Klaim</label>
		                    <input class="form-control input-sm" name="nama" type="text" placeholder="Nama/Kode Klaim">
		                       
		                 </div>
		                 <!-- text input -->
		                 <div class="form-group">
		                    <label>PPK</label>
		                    <select class="form-control input-sm" name="ppk" id="ppk">
		                    		  <option value="all">Semua PPK</option>
		                    	<?php
		                    		foreach ($ppk as $value) {
		                    			echo '<option value="'.$value['kd_ppk'].'">'.$value['ppk'].'</option>';
		                    		}
		                    	?>
		                    </select>
		                       
		                 </div>
		         </div>
		         <div class="box-body col-xs-12 col-lg-6">
	             	<!-- text input -->
               	<div class="form-group">
                  <label>Tanggal Awal</label>
                  <input class="form-control input-sm" name="tgl_awal" id="datepicker1" type="text" placeholder="Tanggal Awal..."> 
               	</div>
               	<!-- text input -->
               	<div class="form-group">
                  <label>Tanggal Akhir</label>
                  <input class="form-control input-sm" name="tgl_akhir" id="datepicker2" type="text" placeholder="Tanggal Akhir...">  
               	</div>
               	<div class="form-group">
                  <button type="submit" class="btn btn-sm btn-primary btn-flat pull-right"><i class="fa fa-search"></i> Cari</button>
               	</div>
		         </div>		
	             <?=form_close();?>
	             <div class="clearfix"></div>
	            	<span class="notif notif-primary" <?php if(is_string($this->session->flashdata('sukses'))){echo 'style="display:block;"';}else{echo 'style="display:none;"';}?>>
	            		<i class="fa fa-check"></i>
	            		<?php echo $this->session->flashdata('sukses'); ?>
	            		<button type="button" class="close">&times;</button>
	            	</span>

	            	<span class="notif notif-danger" <?php if(is_string($this->session->flashdata('gagal'))){echo 'style="display:block;"';}else{echo 'style="display:none;"';}?>>
	            		<i class="fa fa-check"></i>
	            		<?php echo $this->session->flashdata('gagal'); ?>
	            		<button type="button" class="close">&times;</button>
	            	</span>

	            	<div class="pull-right">
		            	<!--<a href="<?php echo site_url('master_agama/excel')?>" class="btn btn-xs btn-tbl btn-flat"><i class="fa fa-file-excel-o"></i>&nbsp;&nbsp;Save as Excel</button></a>
	                <a href="<?php echo site_url('master_agama/pdf')?>" target="_blank" class="btn btn-xs btn-tbl btn-flat"><i class="fa fa-file-pdf-o"></i>&nbsp;&nbsp;Save as PDF</button></a>  	 -->
                </div>
                <table class="table table-hover table-condensed table-striped">
									<thead>
									<tr>
										<th style="text-align:center;">#</th>
										<th>Kode Klaim</th>
										<th>Kd. Surat Jaminan</th>
										<th>No. Peserta</th>
										<th>Nama Peserta</th>
										<th>Jenis Kunjungan</th>
										<th>Tanggal Klaim</th>
										<th></th>
									</tr>
									</thead>
									<?php 
										if(!empty($results)){
											foreach ($results as $row) {
									?>
									<tr>
										<td width="3%" align="center"><?php echo $ordinal_num++ ?></td>
										<td width="8%"><?php echo $row['kd_klaim']?></td>
										<td width="12%"><?php echo $row['KSJ']?></td>
										<td width="10%"><?php echo $row['peserta']?></td>
										<td width="22%"><?php echo $row['nama']?></td>
										<td width="12%"><?php echo $row['jenis_kunjungan']?></td>
										<td width="15%"><?php echo tgl($row['tgl_klaim'])?></td>
										<td>
											<span class="pull-right">
												<?php echo anchor('klaim/detail/'.$row['kd_klaim'].'','Detail','class="label label-info" title="Detail data klaim"'); ?>
												<?php echo anchor('klaim/edit/'.$row['kd_klaim'].'','Edit','class="label label-warning" title="Edit data klaim"'); ?>
												<?php //echo anchor('klaim/delete/'.$row['kd_klaim'].'','Hapus','class="label label-danger" title="Hapus data klaim" onClick="return confirm(\'Yakin ingin menghapus '.$row['kd_klaim'].' dari data master agama?\');"'); ?>
											</span>
										</td>
									</tr>
									<?php 
											}
										}else{
									?>
									<tr>
										<td colspan="8" align="center">Tidak ada data</td>
									</tr>
									<?php
										}
									?>							
								</table>									
	            </div><!-- /.box-body -->
	            <div class="box-footer clearfix">
                <ul class="pagination pagination-sm no-margin pull-right">
                  <?php echo $pagination; ?>
                </ul>        
	            </div>
	        </div><!-- /.box -->                            
	    </div>
	</div>